﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace KongMing.ORM.SqlSugar.Models
{
    public class SqlSugarJsonConfig
    {
        [SugarColumn(IsPrimaryKey =true)]
        public string Key { get; set; }

        public string Name { get; set; }

        [SugarColumn(ColumnDataType ="varchar(max)",IsJson =true)]
        public List<Config_String> StringConfig { get; set; }

        [SugarColumn(ColumnDataType = "varchar(max)", IsJson = true)]
        public Config_Int IntConfig { get; set; }
    }

    public class Config_String
    {
        public string Key { get; set; }
        public string Value { get; set; }
    }

    public class Config_Int
    {
        public string Key { get; set; }
        public int Value { get; set; }

        public int MaxValue { get; set; }

        public int MinValue { get; set; }
    }
}
